﻿
#region 程序集引用区
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using SubSonic.DataProviders;
using SubSonic.Extensions;
using System.Linq.Expressions;
using SubSonic.Schema;
using System.Collections;
using SubSonic;
using SubSonic.Repository;
using System.ComponentModel;
using System.Data.Common;
using SubSonic.Query;
using System.Xml;
using System.Xml.Serialization;
using System.Reflection;

using WebeTerm.Common;
using WebeTerm.Model;
using WebeTerm.DbProvider;
#endregion


namespace WebeTerm.DbBusiness{
    /// <summary>
    /// 文 件 名: CompanyMailPoolBLL.cs
    /// CLR版本 : v2.0.50727
    /// 作   者 : lijun.hu
    /// 版    权: Copyright @2011 lijun.hu(FORCEN HU) 
    /// 电子邮箱：lijun.hu@shinsoft.net
    /// 说    明: 公司邮件队列
    /// 生成日期: 2014年12月5日
    /// </summary>
    public partial class CompanyMailPoolBLL:BaseBLL< CompanyMailPool > {
        public CompanyMailPoolBLL( ):base(new CompanyMailPoolDAL()) { }
           
            public CompanyMailPool GetCompanyMailPool(
                System.Guid  Id 
            ) {
                return new CompanyMailPoolDAL().FirstOrDefault(l => 
                l.Id ==Id
                )??new CompanyMailPool();
            }
            
            
            
        #region 通用查询
        /// <summary>
        /// 查询系统设置
        /// </summary>
        /// <param name="queryParam">条件</param>
        /// <param name="pages">分页信息</param>
        /// <returns>系统设置</returns>
        public List< CompanyMailPool > SearchCompanyMailPool(CompanyMailPoolQuery queryParam, Pages pages)
        {
            return new CompanyMailPoolDAL().SearchCompanyMailPool(queryParam, pages);
        }

        /// <summary>
        /// 获取单实体
        /// </summary>
        /// <param name="queryParam">条件</param>
        /// <returns>系统设置数</returns>
        public CompanyMailPool GetSingleCompanyMailPool(CompanyMailPoolQuery queryParam)
        {
            return new CompanyMailPoolDAL().QueryCompanyMailPool(queryParam).FirstOrDefault();
        }


        /// <summary>
        /// 计算系统设置数
        /// </summary>
        /// <param name="queryParam">条件</param>
        /// <returns>系统设置数</returns>
        public int SearchCompanyMailPoolCount(CompanyMailPoolQuery queryParam)
        {
            return new CompanyMailPoolDAL().SearchCompanyMailPoolCount(queryParam);
        }
        
        
        /// <summary>
        /// 通过主键获取实体
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public  override CompanyMailPool GetOriginalModel(CompanyMailPool model) {
            return FirstOrDefault(l => 
            l.Id ==model.Id
            );
        }
        #endregion

        
        }
    }
